<template>
  <div>
    <el-dialog title="新增行业" :visible.sync="dialogVisible" width="600px">
      <el-form
        :label-position="labelPosition"
        label-width="80px"
        :model="formInline"
      >
        <el-form-item label="行业名称">
          <el-input
            v-model="formInline.title"
            placeholder="请输入行业名称"
          ></el-input>
        </el-form-item>
        <el-form-item label="提点">
          <el-input
            v-model="formInline.viewCount"
            placeholder="请输入提点"
          ></el-input>
        </el-form-item>
        <el-form-item label="排序">
          <el-input
            v-model="formInline.status"
            placeholder="请输入排序"
          ></el-input>
        </el-form-item>
        <el-form-item label="是否显示" label-width="70px">
          <el-radio v-model="formInline.status" label="1">是</el-radio>
          <el-radio v-model="formInline.status" label="2">否</el-radio>
        </el-form-item>
      </el-form>

      <span slot="footer" class="dialog-footer">
        <el-button @click="reset">重置</el-button>
        <el-button type="primary" @click="sure">保存内容</el-button>
      </span>
    </el-dialog>
      <el-dialog title="行业编辑" :visible.sync="dialogVisible2" width="600px">
      <el-form
        :label-position="labelPosition"
        label-width="80px"
        :model="formInline"
      >
        <el-form-item label="行业名称">
          <el-input
            v-model="formInline.title"
            placeholder="请输入行业名称"
          ></el-input>
        </el-form-item>
        <el-form-item label="提点">
          <el-input
            v-model="formInline.viewCount"
            placeholder="请输入提点"
          ></el-input>
        </el-form-item>
        <el-form-item label="排序">
          <el-input
            v-model="formInline.status"
            placeholder="请输入排序"
          ></el-input>
        </el-form-item>
        <el-form-item label="是否显示" label-width="70px">
          <el-radio v-model="formInline.status" label="1">是</el-radio>
          <el-radio v-model="formInline.status" label="2">否</el-radio>
        </el-form-item>
      </el-form>

      <span slot="footer" class="dialog-footer">
        <el-button @click="reset">重置</el-button>
        <el-button type="primary" @click="sure">保存内容</el-button>
      </span>
    </el-dialog>
  </div>
</template>

<script>
export default {
    
  data() {
    return {
      labelPosition: "right",
      dialogVisible: false, //新增行业
      dialogVisible2:false,//编辑行业
      formInline: {
        title: "",
        id: "",
        viewCount: "",
        status: "",
      },
    };
  },
  methods: {
    reset() {
      this.formInline = "";
    },
    sure() {
      this.dialogVisible = false;
      console.log(this.formInline);
      //   updateById({
      //     id: this.formInline.id,
      //     sex: +this.formInline.sex,
      //     username: this.formInline.username,
      //     nickname: this.formInline.nickname,
      //     availableIntegral: this.formInline.availableIntegral,
      //     birthday: this.formInline.birthday,
      //     level: this.formInline.level,
      //     spareMoney: this.formInline.spareMoney,
      //   })
      //     .then((res) => {
      //       console.log(res);
      //       this.editSuccessNotify();
      //     })
      //     .catch((err) => {
      //       console.log(err);
      //     });
    },
  },
};
</script>

<style>
</style>